import time
from wxauto import *

def run():
    # 实例化微信对象
    wx = WeChat()

    # 指定监听目标
    listen_list = [
        '文件传输助手'
    ]

    for user in listen_list:
        wx.AddListenChat(who=user,savepic=True)

    while True:
        msgs = wx.GetListenMessage()
        print(msgs)
        time.sleep(5)

if __name__=="__main__":
    run()